home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 49
/
Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso
/
-serious-
/
comms
/
other
/
novia
/
bin
/
logoff.c
< prev
next >
Wrap
Text File
|
1999-12-06
|
869b
|
36 lines
#include <pragma/noviasys_lib.h>
#include <pragma/exec_lib.h>
#include <pragma/dos_lib.h>
#include <stdio.h>
#include <novia/novia_portdata.h>
struct Library *NoviaSysBase;
void ioprintf(const char *string, ...)
{
char *buffer=AllocVec(10000,MEMF_ANY|MEMF_CLEAR);
if (buffer)
{
vsprintf(buffer, string, unsigned int(&string + 1));
Writeio(buffer,-1);
FreeVec(buffer);
}
}
void main()
{
if ((NoviaSysBase = OpenLibrary("noviasys.library", 0)))
{
struct PortData *cport = (struct PortData *)FindTask(NULL)->tc_UserData;
if (progtype==NOVIA_CLIENT)
{
ClearMemQuick(&cport->LocalUser,sizeof(UserData));
ClearMemQuick(&cport->EditUser,sizeof(UserData));
cport->systemservice=FALSE;
ioprintf("\nc7%s c3logged off\n",cport->LocalUser.Handle);
}
else
ioprintf("This is a client command.\n");
CloseLibrary(NoviaSysBase);
}
}